<!-- 员工查询的窗口 -->
<template>
  <div>
    <el-dialog v-model="openFlag" title="员工查询" width="80%" append-to-body>
      <div class="lr-layout">
        <div class="right">
          <vxe-table :data="list">
            <vxe-column title="姓名" field="userName"></vxe-column>
            <vxe-column title="公司" field="companyName"></vxe-column>
            <vxe-column title="部门" field="deptName"></vxe-column>
            <vxe-column title="盘点状态" field="state"></vxe-column>
            <vxe-column title="应盘资产数" field="toInventoryNum"></vxe-column>
            <vxe-column title="未盘" field="draft"></vxe-column>
            <vxe-column title="正常" field="normal"></vxe-column>
            <vxe-column title="盘盈" field="profit"></vxe-column>
            <vxe-column title="盘亏" field="loss"></vxe-column>
          </vxe-table>
        </div>
      </div>
    </el-dialog>

  </div>
</template>

<script setup>

import api from "./api.js";
import WarehouseSelect from "@/components/Warehouse/WarehouseSelect.vue";
import ImageShow from "@/components/Common/ImageShow.vue";
import {getToken} from "@/utils/auth.js";
import UserSelect from "@/components/User/UserSelect.vue";

const emit = defineEmits(["sub"]);

const openFlag = ref(false);
const list = ref([]);
let currentPhotoRow = null;

const formDataInit = {
  warehouseId: null,
  location: null,
  userId: null,
  result: null
}

// 表单参数
const formData = reactive({ ...formDataInit });

function reset() {
  list.value = [];
  Object.assign(formData, formDataInit)
}

function open(rows) {
  openFlag.value = true;
  reset();
  list.value = rows;
}

function close() {
  openFlag.value = false;
}

defineExpose({
  open
})


</script>
<style scoped lang="scss">

.left {
  width: 500px;
  padding: 15px;
}

</style>

